﻿package edzis.translatebuddy{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	
	/**
	 * A helper for translating large ammount of words in a session
	 * @author Edgars Simsons
	 * @usage 1.	Enter all the words in a session that need to be translated
	 * @usage 2.	Find translations for the words for one at a time by looking up at web dictionaries and copying the appropriate translation
	 * @usage 3.	View and print the saved information for each session
	 */
	public class TranslateBuddy extends Sprite {
		
		protected var facade:ApplicationFacade;
		
		public static const NAME:String = 'TranslateBuddy';
		
		public function TranslateBuddy():void {
			
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			
			facade = ApplicationFacade.getInstance(NAME);
			facade.startup(this);
			ArthropodDebug.log("after startup");
		}
	}
	
}